﻿using System;
using System.Collections.Generic;

using System.Text;
using TomShane.Neoforce.Controls;
using RebEngine.Managers;

namespace RebellionII.GUI
{
    public class MessageWindow : Window
    {
        public Button btn1 { set; get; }
        public Button btn2 { set; get; }
        TextBox lbl1;

        public MessageWindow(string message, string sBtn1, string sBtn2)
            :base(InputManager.Manager)
        {
            Init();
            Center();
            Height = 200;
            Width = 500;
            InputManager.Manager.Add(this);
            Closed += new WindowClosedEventHandler(MessageWindow_Closed);

            btn1 = new Button(InputManager.Manager);
            btn1.Init();
            btn1.Top = 110;
            btn1.Left = 105;
            btn1.Width = 100;
            btn1.Height = 30;
            btn1.Text = sBtn1;
            Add(btn1);

            btn2 = new Button(InputManager.Manager);
            btn2.Init();
            btn2.Top = 110;
            btn2.Left = 245;
            btn2.Width = 100;
            btn2.Height = 30;
            btn2.Text = sBtn2;
            Add(btn2);

            lbl1 = new TextBox(InputManager.Manager);
            lbl1.Top = 15;
            lbl1.Left = 10;
            lbl1.Width = 460;
            lbl1.Height = 80;
            lbl1.Text = message;
            lbl1.ReadOnly = true;
            lbl1.DrawBorders = false;
            Add(lbl1);

        }

        void MessageWindow_Closed(object sender, WindowClosedEventArgs e)
        {
            InputManager.Manager.Remove(this);
        }
    }
}
